# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Domains.V1beta1.Model.RegisterDomainRequest do
  @moduledoc """
  Request for the `RegisterDomain` method.

  ## Attributes

  *   `contactNotices` (*type:* `list(String.t)`, *default:* `nil`) - The list of contact notices that the caller acknowledges. The notices needed here depend on the values specified in `registration.contact_settings`.
  *   `domainNotices` (*type:* `list(String.t)`, *default:* `nil`) - The list of domain notices that you acknowledge. Call `RetrieveRegisterParameters` to see the notices that need acknowledgement.
  *   `registration` (*type:* `GoogleApi.Domains.V1beta1.Model.Registration.t`, *default:* `nil`) - Required. The complete `Registration` resource to be created.
  *   `validateOnly` (*type:* `boolean()`, *default:* `nil`) - When true, only validation is performed, without actually registering the domain. Follows: https://cloud.google.com/apis/design/design_patterns#request_validation
  *   `yearlyPrice` (*type:* `GoogleApi.Domains.V1beta1.Model.Money.t`, *default:* `nil`) - Required. Yearly price to register or renew the domain. The value that should be put here can be obtained from RetrieveRegisterParameters or SearchDomains calls.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :contactNotices => list(String.t()) | nil,
          :domainNotices => list(String.t()) | nil,
          :registration => GoogleApi.Domains.V1beta1.Model.Registration.t() | nil,
          :validateOnly => boolean() | nil,
          :yearlyPrice => GoogleApi.Domains.V1beta1.Model.Money.t() | nil
        }

  field(:contactNotices, type: :list)
  field(:domainNotices, type: :list)
  field(:registration, as: GoogleApi.Domains.V1beta1.Model.Registration)
  field(:validateOnly)
  field(:yearlyPrice, as: GoogleApi.Domains.V1beta1.Model.Money)
end

defimpl Poison.Decoder, for: GoogleApi.Domains.V1beta1.Model.RegisterDomainRequest do
  def decode(value, options) do
    GoogleApi.Domains.V1beta1.Model.RegisterDomainRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Domains.V1beta1.Model.RegisterDomainRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
